package fr.loof.fonzie;

import org.hibernate.proxy.HibernateProxy;
import org.hibernate.proxy.LazyInitializer;

class VehicleProxy
    extends Vehicle
    implements HibernateProxy
{
    private Vehicle vehicle;

    public VehicleProxy( Vehicle vehicle )
    {
        super( vehicle.getId() );
        this.vehicle = vehicle;
    }

    public LazyInitializer getHibernateLazyInitializer()
    {
        return null;
    }

    public Object writeReplace()
    {
        return vehicle;
    }
}